package controllers

import (
	"github.com/gin-gonic/gin"

	"go_user_manager/pkg/adapters/agin"
	"go_user_manager/pkg/framework"
)

type HealthzController struct {
	logger framework.Logger
}

func NewHealthzController(logger framework.Logger) *HealthzController {
	return &HealthzController{
		logger: logger,
	}
}

func (ctrl *HealthzController) InitRouter(r *gin.Engine) {
	r.GET("/healthz", ctrl.get)
}

func (ctrl *HealthzController) get(c *gin.Context) {
	agin.WriteResponse(c, agin.ResponseData{Data: map[string]string{"msg": "hello world!"}}, nil)
}
